﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Validator.Constraints;

namespace Landscape.Business.Entities
{
    public class Role
    {
        public Role()
        {
            //this.ID = -1;
            this.ID = Guid.Empty;
        }

        public virtual Guid ID
        { get; set; }

        [NotNullNotEmpty]
        [Length(Max=255, Message="Role name should have lenght of 2 to 255 charectors.", Min=2)]
        public virtual string Name
        { get; set; }

        [Length(Max = 2000, Message = "Role name should have maximum lenght of 2000 charectors.")]
        public virtual string Description
        { get; set; }

        public virtual bool CanModify
        { get; set; }

        public virtual bool IsDisabled
        { get; set; }

        public virtual bool IsDeleted
        { get; set; }

        public virtual IList<SystemModulePrivilege> Privileges
        { get; set; }

        public virtual Guid CreatedBy
        { get; set; }

        public virtual DateTime CreatedDate
        { get; set; }

        public virtual Guid UpdatedBy
        { get; set; }

        public virtual DateTime UpdatedDate
        { get; set; }

        public virtual IList<UserMaster> Users
        { get; set; }
    }
}
